Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Carol Reluplopflar 17.Jul.03 09:45 PM a Web browser
Domino Server All Releases Windows 2000


Has anyone encountered this error
"java.lang.NoClassDefFoundError: javax/resource/ResourceException" at this line of my code " MQ_QueueManager = new MQQueueManager(qManager);"

When I try to run a java agent in Domino 6 that puts a request on a Queue on a Linux 8 server. The version of Websphere MQ is 5.2.

At the same time I am getting a java.lang.NullPointerException error at "if ( MQ_Queue.isOpen())" this line of my code.

Please forgive the length of this question.
Thanks and I look forward to your reply


My code is:
import lotus.domino.*;
import com.ibm.mq.*;
import java.io.*;
import java.util.*;

public class MQ_Get extends AgentBase
{
private MQQueueManager MQ_QueueManager;
private String qManager = "GHQTEST.QUEUE.MANAGER";
MQMessage MQ_Message;
MQGetMessageOptions MQGet_message_Options;
MQQueue MQ_Queue;
String outString;
String MQFatalError = "False";
String ConnectedQMgrName;
String RandomID;
String incno = ""; // incident number

public void NotesMain()
{
int openOptions = 0;
try
{
MQGet_message_Options = new MQGetMessageOptions();
MQ_Message = new MQMessage();
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Database db = agentContext.getCurrentDatabase();
View vw = db.getView("Retrieve Incident Number");
Document doc = agentContext.getDocumentContext();
vw.refresh();
if ( MQ_QueueManager == null)
{
MQ_QueueManager = new MQQueueManager(qManager);
}
if (MQ_QueueManager.isOpen() == false)
{
MQ_QueueManager.close();
}
if(MQFatalError == "False")
{
MQGet_message_Options = new MQGetMessageOptions();
openOptions =MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING;
MQGet_message_Options.options = MQC.MQGMO_NO_WAIT | MQC.MQGMO_ACCEPT_TRUNCATED_MSG |
MQC.MQGMO_FAIL_IF_QUIESCING;
}
MQ_Queue = MQ_QueueManager.accessQueue("XX.GHQTEST.QUEUE.MANAGER", openOptions,null,null,null);
if (MQFatalError =="False")
{
outString = "123";
while(outString.length() != 0)
{
outString = "";
MQ_Queue.get(MQ_Message,MQGet_message_Options);
System.out.println("MQ Message get complete");
if (MQFatalError =="False")
{
MQ_Message.characterSet = 850;
outString = MQ_Message.readString(MQ_Message.originalLength);
RandomID = outString.substring(83,13);
incno = outString.substring(96,9);
if (outString.length() != 0 )
{
doc = vw.getDocumentByKey(RandomID);
if (doc != null)
{
doc.replaceItemValue("IncidentNumber", incno);
doc.replaceItemValue("MQFlag", "Received");
doc.save(true,true);
}
}
}
}
}
}
catch (NotesException ne)
{
System.out.println("An error occurred in Notes" );
}
catch (MQException MQex)
{
if (MQex.reasonCode == 2058 ) //MQRC_Q_MGR_NAME_ERROR
{
System.out.println("An error was reported by the MQ Session Class, The Queue Manager Name is invalid : Completion Code" + MQex.completionCode + "Reason Code"
+ MQex.reasonCode);
}
else if (MQex.reasonCode == 2059 ) // MQRC_Q_MGR_NOT_AVAILABLE
{
System.out.println("An error was reported by the MQ Session Class, The Queue Manager is not available, : Completion Code" + MQex.completionCode + "Reason Code"
+ MQex.reasonCode);
}
else if (MQex.reasonCode == 2085 ) // MQRC_UNKNOWN_OBJECT_NAME
{
System.out.println("An error occurred in MQSeries The Queue Name is invalid : Completion Code" + MQex.completionCode + "Reason Code" + MQex.reasonCode);
}
else if (MQex.reasonCode == 2033 ) // MQRC_NO_MSG_AVAILABLE
{
System.out.println("There are no messages on the queue,: Completion Code" + MQex.completionCode + "Reason Code" + MQex.reasonCode);
}
else
{
System.out.println("An error was reported by the MQ Queue Class, The Completion Code" + MQex.completionCode + "Reason Code" + MQex.reasonCode);
}
}
catch( IOException EOe )
{
System.out.println("An end of file error occured " );
}
catch( Exception e )
{
e.printStackTrace();
}
finally
{
try
{
if ( MQ_Queue.isOpen() )
{
MQ_Queue.close();
}
if ( MQ_QueueManager.isOpen() )
{
System.out.println( "Disconnecting from Queue Manager" );
MQ_QueueManager.disconnect();
}
}
catch( Exception e )
{
e.printStackTrace();
}
} // end of finally

} // end of NotesMain
} // end of Agent






java.lang.NoClassDefFoundError: jav... (~Carol Reluplop... 17.Jul.03)
. . RE: java.lang.NoClassDefFoundError:... (~Helga Fronubur... 19.Jul.03)
. . . . RE: java.lang.NoClassDefFoundError:... (~Evelyn Umhipiz... 24.Sep.03)
. . . . . . RE: java.lang.NoClassDefFoundError:... (~Naomi Nimkitex... 24.Sep.03)
. . . . . . . . RE: java.lang.NoClassDefFoundError:... (~Evelyn Umhipiz... 25.Sep.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS